package cn.tedu;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

//接收请求+做出响应
@RestController//接收浏览器发出的请求
@RequestMapping("car")//规定uil的写法
public class CarController {
    @RequestMapping("save")
    public String save(){
        return "abc";
    }

    @RequestMapping("get")
    public void get(){
        System.out.println("123");
    }

    @RequestMapping("find")
    public Car find(){
        Car car=new Car();
      car.setId(718);
      car.setName("保时捷");
      car.setType("Cayman T");
      car.setColor("红色");
      car.setPrice(641000.0);
      System.out.println(car);
      return car;
    }
}
